from django.db import models

# Create your models here.
from django.db import models


class User(models.Model):
    username = models.CharField(verbose_name='用户名', max_length=30, unique=True)
    password = models.CharField(verbose_name='密码', max_length=30)
    birthday = models.DateField(verbose_name='生日')
    gender_choose = ((0, '女'), (1, '男'), (2, '未知'))
    gender = models.IntegerField(verbose_name='性别', choices=gender_choose)
    address = models.CharField(verbose_name='所在地', max_length=30)
    phone = models.CharField(verbose_name='手机号', max_length=20)
    email = models.EmailField(verbose_name='邮箱', max_length=254)

    class Meta:
        verbose_name_plural = '用户信息表'

    def __str__(self):
        return self.username
